import request from '@/utils/request'
import type {
    LoginParams,
    LoginResponseData
} from '@/api/login/type.ts'

// 用户相关的登录统一管理接口
enum API {
    LOGIN_URL = '/admin/login/loginMailCode',
    // 发送验证码
    CAPTCHA_URL = '/admin/login/sendeMailCode/',
}


// 发送验证码
export const reqCaptchaCode = (email: string) =>
    request.get<any, LoginResponseData>(API.CAPTCHA_URL + email)

//暴露请求函数
//登录请求函数
export const reqLogin = (data: LoginParams) =>
    request.post<any, LoginResponseData>(API.LOGIN_URL, data)





